@extends('backend.layouts.app')
@section('title', '添加业务员管理')
@section('sa-op', 'menu-open')
@section('sa-ac', 'active')
@section('content')
     <!-- left column -->
          <div class="col-md-12">
            <!-- general form elements -->
            <div class="card card-default">
              <!-- form start -->
              @include('common._errors')
              <form role="form" method="POST" action="{{route('admin.salesmans.store')}}">
                  @csrf
                <div class="card-body"> 
                  <div class="form-group mb-4">
                    <label for="exampleInput1">用户名</label>
                    <input type="text" class="form-control" id="exampleInput1" name="name" placeholder="用户名">
                     <span class="input-group-append">
                  </span>
                  </div>  
                  <div class="form-group">
                      <label for="exmpleInput2">密码</label>
                       <input type="text" class="form-control" id="exmpleInput2" name="password" placeholder="密码">
                  </div>
                   <div class="form-group mb-4">
                    <label for="exampleInput1">邮箱</label>
                    <input type="email" class="form-control" id="exampleInput1" name="email" placeholder="邮箱">
                     <span class="input-group-append">
                  </span>
                  </div> 
                  <div class="form-group">
                      <label for="info">卡号</label>
                       <select multiple="multiple"  id="my-select" name="my-select[]">
                             @foreach($cards as $card)
                               <option value="{{$card->id}}"> {{ $card->id }}/{{$card->card_num}} --￥ {{$card->card_money}}</option>
                             @endforeach
                        </select>
                  </div>
                </div>
                <!-- /.card-body -->

                <div class="card-footer">
                  <button type="submit" class="btn btn-primary">提交</button>
                </div>
              </form>
            </div>
            <!-- /.card -->

          </div>
          <!--/.col (left) -->
@endsection

@section('script')
   <link href="{{ asset('asset/lou-multi-select/css/multi-select.css') }}"   rel="stylesheet" type="text/css">
   <script src="{{ asset('asset/lou-multi-select/js/jquery.multi-select.js') }}" type="text/javascript"></script>
   <script>
       $('#my-select').multiSelect({

       })
   </script>
@endsection